import org.junit.After;
import org.junit.Before;
import org.junit.Test;


public class JedisRedisTest {
        private JedisRedis jedisRedis;
    @Before
    public void setUp() throws Exception {
        jedisRedis=new JedisRedis();
    }

    @After
    public void tearDown() throws Exception {
        if (jedisRedis!=null){
            jedisRedis.destroy();
        }
    }
    @Test
    public void test(){
        System.out.println(jedisRedis.set("key","value"));
        System.out.println(jedisRedis.get("key"));
        System.out.println("是否存在"+jedisRedis.exists("key"));
        System.out.println("key超时时间"+jedisRedis.expire("key",1234));
        System.out.println("key剩余时间"+jedisRedis.ttl("key"));
    }

}